<!DOCTYPE html>
<html>
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>我的办公用品申请单</title>

    <link rel="shortcut icon" href="__STATIC__/layout/favicon.ico">
    <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/channel.css?v=4.1.0" rel="stylesheet">
    <!-- Sweet Alert -->
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">


    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <style>

    </style>

</head>

<body class="white-bg" style="padding: 3px;font-size: 13px">
<div class="page-heade">
    <h2 class="title_color text-center">公共信息管理</h2>
</div>
<table class="table table-bordered bud_hei">
    <tr>
        <td colspan="6"><a href="javascript:;" class="btn btn-sm btn-primary" id="commonInfoNoted">公共信息发布</a></td>
    </tr>
</table>
<table class="table table-striped table-bordered table-hover bud_hei text-center" style="width: 100%;">
    <tr class="info">
        <th class="text-center">No.</th>
        <th class="text-center">类型</th>
        <th class="text-center" style="width: 240px">主题</th>
        <th class="text-center">置顶</th>
        <th class="text-center">滚动显示</th>
        <th class="text-center">标题加红</th>
        <th class="text-center">发布日期</th>
        <th class="text-center">设定有效日期</th>
        <th class="text-center">操作</th>
    </tr>
    <tbody style="border: 0">
    {volist name="data" id="row" key="k"}
    <tr>
        <td>{$k+((request()->param('page')?request()->param('page'):1)-1)*10}</td>
        <td>{$row.lx}</td>
        <td class="text-left"><a href="{:url('view',['id'=>$row.id])}" class="J_menuItem">{$row.title}</a></td>
        <td>{$row.sd_sfzd}</td>
        <td>{$row.sd_sfgdxs}</td>
        <td>{$row.sd_sfbtjhs}</td>
        <td>{$row.fbrq}</td>
        <td>{$row.sd_yxrq}</td>
        <td><a href="javascript:;" data-link="{:url('update',['id'=>$row.id])}" class="update">修改</a>&nbsp;<a href="javascript:;" data-link="{:url('delete',['id'=>$row.id])}" class="delete">删除</a></td>
    </tr>
    {/volist}
    </tbody>
</table>
<h5 class="text-center" style="font-size: 13px;font-weight: 500">
    {$page}
</h5>
<!-- 全局js -->
<script src="__STATIC__/layout/js/jquery.min.js"></script>
<script src="__STATIC__/layout/js/contabs_sub.js"></script>
<script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
<!-- Sweet alert -->
<script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
<script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
<script src="__STATIC__/layout/js/contabs_sub.js"></script>
<script>
    $(function () {
        $('.update').on('click',function () {
            var link = $(this).data('link')
            layer.open({
                type: 2,
                title: '公共信息发布',
                area: ['1200px', '600px'],
                fixed: false, //不固定
                maxmin: true,
                content: link
            });
            return false
        })

        $('.delete').on('click',function () {
            var link = $(this).data('link')
            swal({
                    title: "提示",
                    text: "您真的要删除么？",
                    type: "warning",
                    showCancelButton: true,
                    confirmButtonColor: "#FF3333",
                    confirmButtonText: "是的我要删除",
                    cancelButtonText: "取消",
                    closeOnConfirm: true
                },
                function (isConfirm) {
                    if (isConfirm) {
                        $.post(link,function (data) {
                            if(data.success){
                                swal({title:data.msg},function () {
                                    location.reload()
                                })
                            }else{
                                swal(data.msg)
                            }
                        },'json')
                    }
            })

            return false
        })
        $('body').on('click', 'input[type=text]', function () {
            this.select()
        })
    })
</script>
<script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
<script>

    $("#commonInfoNoted").click(function () {
        layer.open({
            type: 2,
            title: '公共信息发布',
            area: ['1200px', '600px'],
            fixed: false, //不固定
            maxmin: true,
            content: "{:url('commonInfoNote')}"
        });
        return false

    })
</script>
</body>

</html>